<link rel="stylesheet" media="screen" type="text/css" href="<?php echo bu("css/datepicker.css"); ?>" />
<script type="text/javascript" src="<?php echo bu("js/datepicker.js"); ?>"></script>
<script>
		$(function() {
      $( "#datepicker" ).datepicker({
        changeMonth: true,
        changeYear: true,
        yearRange: '1900:2011',
        dateFormat: 'd MM yy',
      });
    });
</script>

<script>
  function verify(){
    var pass = document.forms["myForm"]["Users[password]"].value;
    var confirm = document.forms["myForm"]["Users[confirm_password]"].value;
    if((pass != confirm ) || (pass == '') || (confirm == '') ){
      alert("You must confirm your password correctly!");
      return false;
    }
    else{
      return true;
    }
  }
</script>

<link rel="stylesheet" href="<?php echo bu("css/datepicker.css"); ?>">
<div class='mainContainer home'> <!-- Main div for the contain, behaves like a table-->
	<div><!-- Direct child of mainContainer, behaves like a table cell-->
		<h2 class='differentAlign'>Registration <span class='differentHeading'>Form</span></h2>
		<div class='spacer'>&nbsp;</div>

      <?php $form=$this->beginWidget('CActiveForm', array(
          'action' => bu('users/create'),
          'htmlOptions' => array(
              'name' => 'myForm',
              'onSubmit' => 'javascript:return verify();',
              )
          ));
      ?>
			<p>
				<label>Email *</label>
        <?php echo $form->textField($user, 'email'); ?>
        <?php echo $form->error($user, "email"); ?>
			</p>
			<p>
				<label>Username *</label>
        <?php echo $form->textField($user, 'username'); ?>
        <?php echo $form->error($user, "username"); ?>
			</p>
			<p>
				<label>Password *</label>
        <?php echo $form->passwordField($user, 'password'); ?>
        <?php echo $form->error($user, "password"); ?>
			</p>
			<p>
				<label>Confirm Password *</label>
        <input type='password' name='Users[confirm_password]' />
			</p>

        <?php echo $form->hiddenField($user, 'member_id') ?>


			<div class='spacer'>&nbsp;</div>
			<hr />
			<div class='spacer'>&nbsp;</div>


			<p>
				<label>Country</label>
				<select name='user[country]'>
                <?php $this->renderPartial('/partials/_country'); ?>
				</select>
			</p>
			<p>
        <label>Birthdate</label>
        <?php echo $form->textField($user, "birthdate", array("id" => "datepicker", "readonly" => "true")); ?>
			</p>

			<div class='spacer'>&nbsp;</div>
			<hr />
			<span class='footnote'>* Must not be blank</span>
			<div class='spacer'>&nbsp;</div>

			<input type='submit' value='Submit' />
			<input type='submit' value='Reset' />
		<?php $this->endWidget(); ?>
	</div>

  <div class='rightPane'>
    <h2 class='differentAlign'>Search <span class='differentHeading'>Members</span></h2>
    <div class='spacer'>&nbsp;</div>
    <input type="text" name="member" />
    <input type="submit" value="Search" />
    <div class='spacer'>&nbsp;</div>

		<h2 class='differentAlign'>Member <span class='differentHeading'>Benefits</span></h2>
		<div class='spacer'>&nbsp;</div>
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tincidunt, enim at malesuada aliquam, mauris odio iaculis dolor, tempus mollis ligula erat sed velit. Proin tincidunt urna non lacus posuere pretium eget sed metus. Vivamus diam sem, commodo id laoreet eu, rhoncus id metus. Sed diam urna, dictum vitae pharetra ac, fringilla in arcu. Vivamus ut libero eget lectus sodales eleifend sit amet eu nisi. Integer dapibus sollicitudin fringilla. Nullam pharetra dapibus libero, vel consequat nunc suscipit a. Donec egestas augue libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae.</p>
	</div>
</div>

<div class='spacer'>&nbsp;</div>